<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
	'id'=>'news-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="help-block">Поля со <span class="required">*</span> обязательны для заполнения.</p>

	<?php echo $form->errorSummary($model); ?>

	<?php echo $form->textFieldRow($model,'title',array('class'=>'span5','maxlength'=>100, 'title'=>'Заголовок новости')); ?>

	<?php echo $form->textFieldRow($model,'alias',array('class'=>'span5','maxlength'=>255)); ?>

    
    <p>Предварительное содержание</p>
    <?php $this->widget('application.extensions.ckeditor.CKEditor',    //Подключаем CKeditor+CKfinder
                array( 'model'=>$model, 
                        'attribute'=>'prev_content', 
                        'language'=>'ru', 
                        'options'=>array(
                            'width'=>'50%',
                            'height'=>'300px',
                            ),
                        'editorTemplate'=>'full', ));
     ?>
    <br />
    
    <p>Полное содержание</p>
    <?php $this->widget('application.extensions.ckeditor.CKEditor',    //Подключаем CKeditor+CKfinder
                array( 'model'=>$model, 
                        'attribute'=>'full_content', 
                        'language'=>'ru', 
                        'options'=>array(
                            'width'=>'50%',
                            'height'=>'400px',
                            ),
                        'editorTemplate'=>'full', ));
     ?>
    
    <br />
    
  
	<?php echo $form->textFieldRow($model,'meta_title',array('class'=>'span5','maxlength'=>255)); ?>

	<?php echo $form->textAreaRow($model,'meta_description',array('rows'=>6, 'cols'=>50, 'class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'meta_keywords',array('class'=>'span5','maxlength'=>255)); ?>

	<?php echo $form->textFieldRow($model,'image',array('class'=>'span5','maxlength'=>100)); ?>

    <br />
    <?php echo $form->dropDownList($model, 'status', array(1=>"Опубликовано", 0=>"Не опубликовано"), array('style'=>'width:150px')); ?>
    
    

	<?php // echo $form->textFieldRow($model,'create_time',array('class'=>'span5')); ?>

     <br />
    <?php echo $form->labelEx($model, 'public_time'); ?>
    <?php
  
        $this->widget(
                      'zii.widgets.jui.CJuiDatePicker', array(
                      'model' => $model,
                      'attribute' => 'public_time',
                      'language' => 'ru',
                      // 'value' => date('Y-m-d', $model->public_time),                                        
                        'options' => array( 'dateFormat' => 'dd-mm-yy' )            //yy-mm-dd
                                                )
                      );
    ?>

	<div class="form-actions">
		<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
			'label'=>$model->isNewRecord ? 'Создать' : 'Сохранить',
		)); ?>
	</div>

<?php $this->endWidget(); ?>
